import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

/**
 * @Author YuanYuan
 * @Date 2022/9/27
 * @Time 21:35
 */
public class TestDemo7 {
    public static void main(String[] args) throws IOException {
        // 点进去发现是抽象类,只能实例化它的子类
        //这个过程就相当于打开文件!!类似于C中的fopen
        //想操作就得先打开!
        InputStream inputStream = new FileInputStream("bbb.txt");
        while (true) {
            int b = inputStream.read();
            if(-1 == b) {
                break;
            }
            System.out.print((char)b);
        }
        inputStream.close();
    }
}
